Identity verification method, terminal, and server

ABSTRACT

An identity verification method performed at a terminal includes playing in an audio form action guide information including mouth shape guide information selected from a preset action guide information library at a speed corresponding to the action guide information, and collecting a corresponding set of action images within a preset time window; performing matching detection on the collected set of action images and the action guide information, to obtain a living body detection result indicating whether a living body exists in the collected set of action images; according to the living body detection result that indicates that a living body exists in the collected set of action images: collecting user identity information and performing verification according to the collected user identity information, to obtain a user identity information verification result; and determining the identity verification result according to the user identity information verification result.

PRIORITY CLAIM AND RELATED APPLICATIONS

This application is a continuation application of U.S. patentapplication Ser. No. 15/632,143, entitled “IDENTITY VERIFICATION METHOD,TERMINAL, AND SERVER” filed on Jun. 23, 2017, which is a continuationapplication of PCT Patent Application No. PCT/CN2016/081489, entitled“IDENTITY VERIFICATION METHOD, TERMINAL, AND SERVER” filed on May 10,2016, which claims priority to Chinese Patent Application No.201510264333.X, entitled “IDENTITY VERIFICATION METHOD, TERMINAL, ANDSERVER” filed on May 21, 2015, all of which are incorporated byreference in their entirety.

FIELD OF THE TECHNOLOGY

The present disclosure relates to the field of security technologies,and in particular, to an identity verification method, a terminal, and aserver.

BACKGROUND OF THE DISCLOSURE

With continuous development of computer technologies, a user canautomatically complete various operations with the help of a computer. Auser can also remotely manage various services, such as applying for aloan, remotely taking a test, or remote control. Identity verificationneeds to be performed if a user is to manage various services. A currentcommon identity verification method includes a password verificationmethod, an account and password verification method, a mobile phoneverification code verification method, face identification verification,and the like.

However, a simple password verification method can be usually onlyapplied to a one-machine application scenario, such as entrance guardcontrol or a computer local password. The account and passwordverification method is usually applied to an application scenario inwhich a server needs to be remotely logged in, such as logging in to asocial website and logging into to a mail server. An advantage is thatanyone that owns the account and password can pass verification.Security is relatively poor. The mobile phone verification codeverification method is a relatively poor identity verification means,and usually functions by combining other identity verification methods,or is separately applied to an application scenario that has arelatively poor requirement for security. The face identificationverification method can be easily cracked by deceiving a camera by usinga face picture, and does not have great security. Therefore, currentidentity verification methods have relatively poor security and need tobe improved immediately.

SUMMARY

According to various implementations disclosed in the presentapplication, an identity verification method, a terminal, and a serverare provided.

An identity verification method performed at an electronic device havingone or more processors and memory storing a plurality of programsincludes:

playing, in an audio form, action guide information selected from apreset action guide information library, and collecting a correspondingset of action images within a preset time window, wherein the actionguide information includes mouth shape guide information and is beingplayed at a speed corresponding to the action guide information selectedfrom the preset action guide information library;

performing matching detection on the collected set of action images andthe action guide information, to obtain a living body detection resultindicating whether a living body exists in the collected set of actionimages; and

according to the living body detection result that indicates that aliving body exists in the collected set of action images.

A terminal includes memory, a processor, and a plurality of programsstored in the memory, wherein the plurality of programs, when executedby the processor, cause the processor to execute the following steps:

playing, in an audio form, action guide information selected from apreset action guide information library, and collecting a correspondingset of action images within a preset time window, wherein the actionguide information includes mouth shape guide information and is beingplayed at a speed corresponding to the action guide information selectedfrom the preset action guide information library;

performing matching detection on the collected set of action images andthe action guide information, to obtain a living body detection resultindicating whether a living body exists in the collected set of actionimages; and

according to the living body detection result that indicates that aliving body exists in the collected set of action images:

-   -   collecting user identity information and performing verification        according to the collected user identity information, to obtain        a user identity information verification result; and    -   determining the identity verification result according to the        user identity information verification result.

A server includes memory, a processor, and a plurality of programsstored in the memory, wherein the plurality of programs, when executedby the processor, cause the processor to execute the following steps:

selecting action guide information from a preset action guideinformation library, wherein the action guide information includes mouthshape guide information;

sending the action guide information to a terminal;

receiving a set of action images collected and returned by the terminal,wherein the set of action images is collected by the terminal when theaction guide information is played at the terminal, in an audio form, ata speed corresponding to the action guide information selected from thepreset action guide information library;

performing matching detection on the set of action images and the actionguide information, to obtain the living body detection result indicatingwhether a living body exists in the collected set of action images;

according to the living body detection result that indicates that aliving body exists in the collected set of action images; and

-   -   receiving user identity information collected and sent by the        terminal and performing verification according to the collected        user identity information, to obtain a user identity information        verification result; and    -   returning the identity verification result to the terminal.

Details of one or more implementations of the present application areproposed in the following accompanying drawings and descriptions. Otherfeatures, objectives, and advantages of the present disclosure becomeobvious in the specification, the accompanying drawings, and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in the implementations of thepresent application or the existing technology more clearly, thefollowing briefly introduces the accompanying drawings required fordescribing the implementations or the existing technology. Apparently,the accompanying drawings in the following description show merely someimplementations of the present application, and a person of ordinaryskill in the art may still derive other drawings from these accompanyingdrawings without creative efforts.

FIG. 1 is a schematic structural diagram of compositions of an identityverification system according to an implementation;

FIG. 2 is a schematic structural diagram of a terminal according to animplementation;

FIG. 3 is a schematic structural diagram of a server according to animplementation;

FIG. 4 is a schematic flowchart of an identity verification methodaccording to an implementation;

FIG. 5 is a schematic flowchart of a step of performing matchingdetection on a collected action image and action guide information, toobtain a living body detection result indicate whether a living bodyexists in the collected set of action images according to animplementation;

FIG. 6 is a schematic flowchart of a step of collecting user identityinformation and performing verification according to the collected useridentity information, to obtain a user identity information verificationresult according to an implementation;

FIG. 7 is a diagram of an application environment of an identityverification system according to an implementation;

FIG. 8 is a schematic flowchart of an identity verification methodaccording to another implementation;

FIG. 9 is a block structural diagram of an identity verificationapparatus according to an implementation;

FIG. 10 is a block structural diagram of an identity verificationapparatus according to another implementation;

FIG. 11 is a block structural diagram of a user identity informationverification module in FIG. 10 according to an implementation;

FIG. 12 is a block structural diagram of a face image processing modulein FIG. 11 according to an implementation;

FIG. 13 is a block structural diagram of an identity verificationapparatus according to still another implementation; and

FIG. 14 is a block structural diagram of an identity verificationapparatus according to an implementation.

DESCRIPTION OF EMBODIMENTS

To make an objective, technical solutions, and advantages of the presentdisclosure clearer, the present disclosure is further described indetail below with reference to accompanying drawings and specificimplementations. It should be understood that specific implementationsdescribed herein are only used for explaining the present disclosure butare not used for limiting the present disclosure.

As shown in FIG. 1, in one implementation, an identity verificationsystem 100 is provided, including a terminal 110 and a server 120. Theterminal 110 may be a desktop computer and a public query machine, andmay also be a mobile terminal such as a mobile phone, a tablet computer,or a personal digital assistant. The server 120 may be one physicalserver or multiple physical servers.

As shown in FIG. 2, in one implementation, a composition structure ofthe terminal 110 in FIG. 1 is shown in FIG. 2 and includes a processor,an inner memory, a nonvolatile storage medium, a network interface, adisplay, a camera, and an input apparatus that are connected by using asystem bus. An identity verification apparatus is stored in thenonvolatile storage medium of the terminal 110 and is used forimplementing an identity verification method. The processor of theterminal 110 is used for providing calculation and control functions andis configured to execute an identity verification method. A display ofthe terminal 110 may be a liquid crystal display or an electronic inkdisplay. The input apparatus of the terminal 100 may be a touch layercovered on the display, may be a button set on a housing of the terminal110, or may be an external keyboard, touch panel, or mouse.

As shown in FIG. 3, in one implementation, a composition structure ofthe server 120 in FIG. 1 is shown in FIG. 3 and includes a processor, aninner memory, a nonvolatile storage medium, and a network interface thatare connected by using a system bus. An operating system and an identityverification apparatus are stored in the nonvolatile storage medium ofthe server 120. The identity verification apparatus is used forimplementing an identity verification method. The processor of theserver 120 is used for providing calculation and control functions andis configured to execute an identity verification method.

As shown in FIG. 4, in one implementation, an identity verificationmethod is provided. The method can be applied to the terminal 110 inFIG. 1 and FIG. 2 and can also be applied to the terminal 110 and theserver 120 in the identity verification system in FIG. 1. The methodspecifically includes the following steps:

Step 402: Display and/or play in an audio form action guide informationselected from a preset action guide information library, and collect acorresponding set of action images of a user of the terminal within apreset time window.

In some implementations, the preset action guide information libraryincludes various action guide information. A function of the actionguide information is guiding a user to make a corresponding action(e.g., a body movement). For example, if the action guide information is“blink your eyes”, it indicates that a user is guided to make an actionof blinking his eyes. Similar action guide information may also be“blink your left eye and then right eye”, “open your mouth”, “turn yourhead”, or “stretch out four fingers of yours”, to guide a user to makecorresponding actions of blinking eyes in a preset order, opening hismouth, turning his head, and stretching out four fingers of his. Theaction guide information may be randomly selected from the preset actionguide information library or may be selected in a confidential selectionsequence unbeknown to the user of the terminal 110. The selectionsequence is regularly updated. In one implementation, the terminal 110may receive the action guide information selected from the preset actionguide information library and sent by the server 120.

In one implementation, the action guide information includes an actioninstruction sequence composed of multiple action instruction units. Theaction instruction unit herein refers to a minimum action guide unit.One action instruction unit indicates an action. For example, ““blinkyour eyes”, “open your mouth”, or “turn your head” are separately anaction instruction unit. Multiple action instruction units are arrangedin sequence to form an action instruction sequence. For example, if onepiece of action guide information is an action instruction sequence,specifically “blink your eyes, open your mouth, and turn your head”, itindicates that a user needs to make actions of blinking eyes, openingmouth, and turning head in sequence. For another example, the actionguide information may be a literal sequence. Each word in the literalsequence is a separate action instruction unit. That the user generatesa mouth shape of each word is an action. In this implementation, theaction guide information includes an action instruction sequencecomposed of multiple action instruction units. In this way, a situationin which identity verification is cracked by means of random experimentscan be avoided as much as possible, so that a living body detectionresult is more accurate.

The action guide information may be represented in a visual form, suchas in a literal form and in a form of a schematic diagram. The actionguide information is played in an audio form. Specifically, audio dataof characters or words may be pre-recorded. When the action guideinformation is played, corresponding audio data in the action guideinformation is played character by character, or word segmentation maybe first performed on the action guide information, and then the actionguide information is converted into corresponding audio data by usingwords as a unit and is played. Certainly, while the action guideinformation is displayed, the action guide information may be played inan audio form.

While the action guide information is displayed or played, a set ofaction images corresponding to the action guide information iscollected. In some implementations, the action guide information has anassociated time window and only images collected within the time windoware considered as being part of the set of action images and theterminal stops collecting more images when the time window expires. Theaction image herein refers to an image that should include an actionmade by a user according to the action guide information. Images may becollected at a preset time interval within a display and/or play timesegment corresponding to one action instruction unit. In someimplementations, a mapping relationship is established between an actioninstruction unit and a corresponding set of images collected within atime segment for future matching analysis between the images and theaction requirement of the action instruction unit. An image that is mostdifferent from another image collected within the time segment in thecollected images or a part of said image is used as the collected set ofaction images corresponding to the action instruction unit. In oneimplementation, when movement is detected within view of a camera bymeans of movement detection, an image is collected by using the cameraimmediately or after short preset time is waited. The collected image ora part of the collected image is used as the action mages correspondingto the movement.

Step 404: Perform matching detection on the collected set of actionimages and the action guide information, to obtain a living bodydetection result indicating whether a living body exists in thecollected set of action images.

Matching detection is performed on two objects, to detect whether thetwo objects match each other. A degree of matching between the twoobjects may also be detected. If it is detected that the collected setof action images matches the action guide information, it indicates thata living body exists in the collected set of action images, and theliving body detection result indicating that a living body exists in thecollected set of action images is obtained. If it is detected that thecollected set of action images does not match the action guideinformation, it indicates that a living body does not exist, and theliving body detection result indicating that a living body does notexist is obtained.

The living body detection result may take a value from two presetvalues. For example, one is used for indicating that a living bodyexists in the collected set of action images, and zero is used forindicating that a living body does not exist. The living body detectionresult may also be represented by using a matching value indicating adegree of matching between the collected set of action images and theaction guide information. If the matching value exceeds a matching valuethreshold, it indicates that a living body exists in the collected setof action images. If the matching value does not exceed the matchingvalue threshold, it indicates that a living body does not exist. Thematching value herein may be represented by using similarity between theaction image and a preset action image corresponding to the action guideinformation or may be represented by using a value after positivecorrelation is performed on the similarity. The matching value may alsobe represented by using an Euclidean distance between the action featureextracted from the action image and a preset action featurecorresponding to the action guide information, or may be represented byusing a value after positive correlation is performed on the Euclideandistance. Positive correlation refers to inputting a function in whichan independent variable is positively correlated to a dependent variableand outputting a function result.

In one implementation, step 404 includes: extracting an action featurefrom the collected set of action images, and performing matchingdetection on the extracted action feature and a preset action featurecorresponding to the action guide information, to obtain the living bodydetection result whether a living body exists in the collected set ofaction images. Specifically, similarity between the extracted actionfeature and the corresponding preset action feature may be calculated.If the similarity is greater than a similarity threshold, it isdetermined that a living body exists in the collected set of actionimages, and the living body detection result indicating that a livingbody exists in the collected set of action images is obtained. If thesimilarity is less than or equal to a similarity threshold, it isdetermined that a living body does not exist, and the living bodydetection result indicating that a living body does not exist isobtained. The extracted action feature herein may be a geometricfeature, such as the Euclidean distance, and or may be an algebraicfeature, such as a feature matrix.

In one implementation, step 404 includes: sending the collected set ofaction images to a server, so that the server performs matchingdetection on the set of action images and the action guide information,to obtain the living body detection result indicating whether a livingbody exists in the collected set of action images. The collected set ofaction images may be encrypted and sent to the server.

Step 406: Determine an identity verification result according to theliving body detection result.

Specifically, in one implementation, when the living body detectionresult indicates that a living body exists in the collected set ofaction images, the identity verification is passed. In oneimplementation, when the living body detection result indicates that aliving body does not exist, the identity verification fails. In oneimplementation, the identity verification result may also be obtainedaccording to a combination of the living body detection result and otherverification manners. In other words, the identity verification is abinary result indicating the existence of a living body or not. Nofurther identification is required as to, e.g., the information thatuniquely identifies the user of the terminal 110. As will be explainedbelow in connection with FIG. 6, the process of granting a user of theterminal 110 to access certain information that is restricted to itsauthorized user is divided into two stages. The first stage is describedabove in connection with FIG. 4 during which it is determined whetherthere is a living body that is initiating a request for accessing suchinformation. If there is no living body behind the request, the terminal110 and/or the server 120 will not proceed to the second stage duringwhich the user of the terminal 110 is prompted to provide more useridentity information as described in FIG. 6. Using such information, auniqueness of the living body being a user of a service offered throughthe terminal 110 is determined and the user is granted to access a useraccount of the service. By doing so, the chance of accidental exposureof the user identity information described in FIG. 6 is minimizedbecause the terminal 110 will not require such information if thedetermination described in FIG. 4 fails. This two-stage authenticationprocess of a user's identity provides more protection for the serviceoffered by the terminal 110 and/or the server 120 because of therequirement for passing the living body test described in FIG. 4.

In the foregoing identity verification method, a user is guided in avisual and/or sound manner to complete a corresponding action bydisplaying and/or playing the action guide information selected from thepreset action guide information library, so as to collect thecorresponding set of action images. Then matching detection is performedon the collected set of action images and the action guide information,to obtain the living body detection result indicating whether a livingbody exists in the collected set of action images, so as to obtain theidentity verification result according to the living body detectionresult. In this way, a situation of violent cracking by a machine may beavoided by means of living body detection to verify whether a real useris currently performing operations, to make a final identityverification result more accurate and improve security.

In one implementation, the identity verification method furtherincludes: collecting user identity information and performingverification according to the collected user identity information, toobtain a user identity information verification result. Step 406includes: determining the identity verification result according to theliving body detection result and the user identity informationverification result.

Specifically, the user identity information refers to information usedfor proving a user identity, which includes at least one of a useraccount, a user password, user certificate information, and userbiological feature information. The user biological feature informationincludes face feature information, fingerprint feature information, irisfeature information, a palm geometrical shape, and the like. Thecertificate information includes a certificate number, a name, the dateof birth, an issuing authority, a validity period, and the like. Acertificate may be specifically an identity card, a driving license, asocial guarantee card, a passport, and the like.

Collecting the user identity information may be specifically acquiringthe user identity information input by a user. For example, a characterstring entered in a user account input box is acquired as a useraccount, and a character string entered in a user password input box isacquired as a user password. For another example, certificateinformation input in a certificate information input box is acquired.Collecting the user identity information may also be acquiring the useridentity information by calling a camera, a sensor, and the like. Forexample, a certificate image or a face image is acquired by camerascanning, and the fingerprint feature information, the iris featureinformation, and the like are obtained by sensor scanning.

Verification is performed according to the collected user identityinformation. Specifically, the collected user identity information maybe verified. For example, as regards the certificate information,whether a certificate number meets a preset format and whether currenttime is within a validity period may be determined.

Verification is performed according to the collected user identityinformation. Specifically, matching detection may be specificallyperformed on the collected user identity information and prestored useridentity information, to obtain the identity information verificationresult. For example, as regards the user account and the user password,a prestored password corresponding to the user account may be acquired,and whether the collected user password is the same as the prestoredpassword is determined, to obtain the identity information verificationresult. The identity information verification result is used forindicating whether verification performed according to the collecteduser identity information is passed.

In one implementation, the operation of collecting user identityinformation and performing verification according to the collected useridentity information, to obtain a user identity information verificationresult includes: collecting, by a terminal 110, user identityinformation and sending the user identity information to a server, sothat the server performs verification according to the collected useridentity information, to obtain the user identity informationverification result. The collected user identity information may beencrypted and sent to the server.

A final identity verification result is obtained by combining the livingbody detection result and the user identity information verificationresult. In one implementation, the step of determining the identityverification result according to the user identity informationverification result includes: when the living body detection resultindicates that a living body exists in the collected set of actionimages, and the user identity information verification result is thatverification is passed, determining that the identity verificationresult is that verification is passed. In one implementation, the stepof determining the identity verification result according to the useridentity information verification result includes: when the living bodydetection result indicates that a living body does not exist, and theuser identity information verification result is that verification ispassed, determining that the identity verification result is thatverification fails. In one implementation, the step of determining theidentity verification result according to the user identity informationverification result includes: when the living body detection resultindicates that a living body does not exist, and the user identityinformation verification result is that verification is passed,determining that the identity verification result is that verificationfails.

In one implementation, the step of determining the identity verificationresult according to the user identity information verification resultincludes: receiving the identity verification result returned after theserver determines the identity verification result according to theliving body detection result and the user identity informationverification result.

In one implementation, step 404 and the step of collecting user identityinformation and performing verification according to the collected useridentity information, to obtain a user identity information verificationresult are preformed asynchronously, and an execution sequence of twosteps are not limited. In this implementation, efficiency of an identityverification process is ensured by means of asynchronous processing.

As shown in FIG. 5, in one implementation, the action guide informationincludes mouth shape guide information, and the action image includes amouth shape image. Step 404 includes the following steps:

Step 502: Extract a mouth shape feature from a mouth shape image.

The action guide information in this implementation is informationguiding a user to speak and may be referred to as the mouth shape guideinformation. When the action image is collected, a lip position may bedirectly detected, to obtain the action image mainly including a usermouth shape. In one implementation, the action image is a face image.The face image includes a mouth shape image. A mouth of a person isfastened relative to the position of a face. In this way, the mouthshape image in the face image may be directly positioned after the faceimage is determined.

The mouth shape may also be referred to as a lip shape. A mouth shape ofa person may be represented by an inner lip line and an outer lip lineof a mouth, and a feature that can reflect change of the inner lip lineand/or the outer lip line may be used as a mouth shape feature. Usingthe inner lip line as an example, when the mouth shape is tightlyclosing a mouth, the inner lip line is a straight line. When the mouthshape is completely open, the inner lip line is a similar round shape.Therefore, an area of a zone enclosed by the inner lip line may be usedas the mouth shape feature, or a distance between left and rightboundaries of the inner lip line of the mouth shape and a distancebetween upper and lower boundaries may be used as the mouth shapefeature.

Step 504: Perform matching detection on the extracted mouth shapefeature and a preset mouth shape feature corresponding to the actionguide information, to obtain the living body detection result indicatingwhether a living body exists in the collected set of action images.

Specifically, a person may be made in advance to read, at a standardspeed, content expressed by the action guide information, the mouthshape image indicating change of the mouth shape in a reading process iscollected, and the mouth shape feature is extracted as the preset mouthshape feature and is stored correspond to the action guide information.Before step 504 is executed, the extracted mouth shape feature iscompared with the preset mouth shape feature, to perform matchingdetection. Specifically, similarity between the extracted mouth shapefeature and the preset mouth shape feature may be calculated. If thesimilarity is greater than a similarity threshold, the living bodydetection result indicating that a living body exists in the collectedset of action images is obtained. If the similarity is not greater thanthe similarity threshold, the living body detection result indicatingthat a living body does not exist is obtained.

In this implementation, living body detection is performed by guiding auser to change a mouth shape and collecting the mouth shape image. Animplementation cost is low, and accuracy is high. In addition, theaction image may also include a complete face image, and may be appliedto a subsequent identity verification process, improving a resourcereusing rate.

In one implementation, a quantity of action images is a preset quantitygreater than 1. The identity verification method further includes:collecting a face image included in each action image and performingface identification, and when identification results are not the same,directly obtaining an identity verification result indicating thatverification fails. A preset quantity may be set according to needs, forexample, be set to 3, 4, or 5. In this implementation, faceidentification is performed on a face image included in each actionimage. If a user changes in a living body detection process, it causesthat identification results are not the same, and then the identityverification result indicating that verification fails is directlyprovided. In this way, considering that living body detection takes aperiod of time, to ensure security, it is necessary to ensure that asame user performs operation in the living body detection process allthe time.

In one implementation, if the collected user identity informationincludes a face image, face identification is performed on a face imageincluded in each action image and a face graph included in the useridentity information. When the identification results are not the same,the identity verification result indicating that verification fails isdirectly obtained.

In one implementation, step 402 includes: displaying the action guideinformation selected from the preset action guide information libraryand displaying reading progress information at a speed corresponding tothe action guide information. The speed refers to a speed of speaking.Specifically, content expressed by the action guide information may bedisplayed word by word at the speed, or the whole action guideinformation may be directly displayed, and a speed progress bar isdisplayed, so that the speed progress bar changes from a first characterof the action guide information according to a corresponding speed.

In one implementation, step 402 includes: playing the action guideinformation in an audio form at the speed corresponding to the actionguide information selected from the preset action guide informationlibrary. In this implementation, the action guide information is playedat the standard speed, and a user is guided to listen and repeat, sothat the user controls change of a mouth shape at the speed, and theterminal 110 collects the corresponding set of action images.

In this implementation, a user is guided to complete mouth shape changerequired by the action guide information at the standard speed, so as toimprove accuracy of living body detection and avoiding invalidation ofliving body detection resulting from an abnormal speed of the user.

In one implementation, the step of collecting user identity informationand performing verification according to the collected user identityinformation, to obtain a user identity information verification resultincludes: collecting multiple pieces of the user identity informationand separately detecting a user identification corresponding to eachpiece of the user identity information; and detecting whether useridentifications corresponding to the multiple pieces of the useridentity information are the same, to obtain the user identityinformation verification result.

In this implementation, the user identification refers to a character ora character string that can uniquely identify a user. Detection isperformed separately by using multiple pieces of user identityinformation to obtain corresponding user identifications, so as todetect whether these user identifications obtained by detection are allthe same. If the user identifications obtained by detection are all thesame, an identity information verification result that verification ispassed is provided. If the user identifications obtained by detectionare not the same, an identity information verification result thatverification fails is provided. The identity information verificationresult detected in this way is more reliable, so that the final identityverification result is more reliable. The user identification herein maybe an identity card number, a driving license serial number, a socialguarantee card serial code, a passport number, or the like.

As shown in FIG. 6, in one implementation, the step of collecting useridentity information and performing verification according to thecollected user identity information, to obtain a user identityinformation verification result includes:

Step 602: Collect a certificate image and perform literal identificationon the certificate image, to obtain a user identification matching thecertificate image.

Specifically, a client runs on the terminal 110. The client may be anoriginal sound application client or may be a light application client.A light application is an application that can be used without beingdownloaded. A current common light application uses HTML5 (HypertextMarkup Language Version 5) compilation. The terminal 110 sends thecollected certificate image to a server, and the server performs literalidentification on the certificate image, to obtain the useridentification matching the certificate image.

The terminal 110 calls a camera by using the client running on theterminal 110, to scan a certificate in a photographing or videoing formto obtain the certificate image. The terminal 110 may provide aninteraction interface by using the client, to guide a user to scan thecertificate according to a prompt. Specifically, a front side of thecertificate may be first scanned, and then a back side of thecertificate is scanned. Original photos of the front and back sides ofthe certificate and front-side and back-side certificate images cutaccording to a certificate shape may be provided in a scanning process.A quantity of the original photos and a quantity of the front-side andback-side certificate images may be separately one, and certainly, maybe self-defined according to needs. The terminal 110 may furtherdetermine the shape and color distribution of the certificate image, todetermine whether the certificate is a forged certificate or determinewhether the certificate image is forged.

The server may use an OCR means to perform literal identification on thecertificate image, to identify literal information therein. The literalinformation is then compared with certificate information stored on anexternal certificate server, to search for matching certificateinformation, and a corresponding user identification is acquired. Thecertificate server herein may be an identity card server of a citizenidentity management institution, a driving license information server ofa vehicle management institution, a social guarantee card informationserver of a social security guarantee institution, a passportinformation server of a passport issuing institution, or the like.

The server may further compare the identified literal information andliteral information input by the user, to determine whether theidentified literal information matches the literal information. If theidentified literal information and the literal information are not thesame, an identity verification result indicating that identityverification fails is directly provided. In this way, it can be avoidedthat the user embezzles another person's certificate to performoperation. If identification cannot be performed, a reason whyidentification cannot be performed may be provided, and a correspondingerror prompt is provided.

In one implementation, an input user identification may also be directlyacquired. The input user identification herein refers to a useridentification input by the user.

Step 604: Collect a face image and calculate similarity between thecollected face image and a face image corresponding to the useridentification in a face comparison library.

Specifically, if a certificate image exists, and a face comparisonlibrary exists, a certificate head portrait in the certificate image iscaptured, the face image is collected, and the collected face image anda corresponding certificate head portrait are separately compared with aface image corresponding to the user identification in the facecomparison library, to obtain similarity by calculation. The similarityherein indicates a similarity degree between corresponding face images.

If no certificate image exists, or no certificate head portrait iscaptured from the certificate image, only the collected face image iscompared with a face image in the face comparison library, to obtainsimilarity by calculation. In this way, comparison detection may be nolonger performed on the external certificate server.

If no face comparison library exists, the collected face image may becompared with the certificate head portrait. At the same time, thecollected face image and the certificate head portrait are sent to theexternal certificate server and are compared, to obtain similarity bycalculation.

If no certificate image exists, or no certificate head portrait iscaptured from the certificate image, and no face comparison libraryexists, the collected face image may be directly sent to the externalcertificate server and is compared, to obtain similarity by calculation.

Step 606: Determine a user identity information verification resultaccording to the similarity.

Specifically, if the similarity is higher than the similarity threshold,an identity information verification result indicating that verificationis passed is obtained. If the similarity is not higher than thesimilarity threshold, an identity information verification resultindicating that verification fails is obtained. If multiple similaritiesexist, when each similarity is higher than a corresponding similaritythreshold, an identity information verification result indicating thatverification is passed is obtained. When a situation in which thesimilarity does not exceed a corresponding similarity threshold exists,it can be determined that the identity information verification resultis that verification fails.

In this implementation, comprehensive verification is performed on theuser identity information by combining the certificate image and thecollected face image, to make the identity information verificationresult more accurate, to make the identity verification result moreaccurate.

In one implementation, before step 402, it is further included:detecting a financial service operation instruction and acquiring theaction guide information selected from the preset action guideinformation library after detecting the financial service operationinstruction. After step 406, it is further included: executing afinancial service operation corresponding to the financial serviceoperation instruction when the identity verification result is thatverification is passed. The financial service herein includes a loanapplying service, a credit card online management service, an investmentservice, and the like. In this implementation, transaction security inthe financial service is ensured by means of the foregoing identityverification method, so that management of the financial service is moresecure and reliable.

As shown in FIG. 7, in one specific implementation, the server 120includes a lip language living body detection server 121, a first facefeature extraction server 122, a second face feature extraction server123, and a face verification server 124. The lip language living bodydetection server 121 is connected to the terminal 110. The first facefeature extraction server 122 is connected to the terminal 110, thesecond face feature extraction server 123, and the face verificationserver 124. The second face feature extraction server 123 is connectedto the face verification server 124 and the external certificate server130. An identity verification method specifically includes the followingstep 1) to step 5):

Step 1): Lip language living body detection: determine whether a user isa living body by the terminal 110, so as to verify whether a user isperforming a video operation or taking a photo of himself.

Step 1) further includes step A) to step B):

Step A): Face detection (Face Detection): detect appearance of a facefrom various different scenarios and determine a face position. A mainobjective of face detection is searching for a face zone in thecollected image and dividing the image into a face zone and a non-facezone. Therefore, preparation is made for subsequent applications.

Step B): Living body detection (active detection): preselect severalshort sentences used for determining a user mouth shape. For example,100 Chinese short sentences within ten characters are selected. The liplanguage living body detection server 121 analyzes mouth shape featuresof these short sentences, and the mouth shape features are stored in thelip language living body detection server 121. The terminal 110 randomlyselects in a user living body detection page and displays shortsentences that need to be read by the user, to remind the user ofreading. Based on facial feature location, the terminal 110 collectschange of the mouth shape when the user reads the short sentences andcompares with the mouth shape feature of the mouth shape change storedin the lip language living body detection server 121, to determinewhether the above two are the same, to determine whether the user readsthe provided sentences, to determine whether the user is performingoperations in real time.

Step 2): Based on step 1), scan the front side and back side of the useridentity certificate by collecting a selfie or video face information ofthe user by using a mobile device.

Step 3): Perform face feature extraction on the collected user faceinformation, scanned identity card photo information, and user identitycard photo information stored in an authority by using a facial featurelocation method, and then calculate similarity between featureinformation of the above three by using a machine learning algorithm.

Step 3) further includes step a) to step c):

Step a): The facial feature location method is the premise that facefeatures extract main information, and a main objective thereof ispositioning face target organ points from the detected face zone. Theface target organ points include a face profile, eyebrows, eyes, a nose,and a mouth profile and the position.

Step b): Face feature extraction (Face Representation): based on facialfeature location, use a preselected manner to indicate the detected face(including a stock face). A common representation method includes ageometric feature (such as an Euclidean distance), an algebraic feature(a feature matrix), and the like.

Step c): Face identification (Face Identification): Compare a face to beidentified with a known face in a database, to obtain correlationbetween faces.

Step 4): Perform literal identification on user identity card literalinformation collected by scanning, and then perform similaritycalculation with the user identity card literal information having athird-party authority.

Step 5): Determine whether the current user and user information storedin the authority correspond to a same person by combining results of theforegoing steps 3) and 4).

As shown in FIG. 8, in one implementation, an identity verificationmethod is applied to the server 120 in FIG. 1 and FIG. 2. The identityverification method differs from the identity verification method in theforegoing implementations in that: steps of data input and output inthis implementation, such as collecting the action image and the useridentity information and displaying and/or playing the action guideinformation, are executed on the terminal 110. Other steps requiringmassive calculation is completed on the server 120. In this way,calculation pressure of the terminal 110 can be prominently reduced, andefficiency of identity verification can be improved. The methodincludes:

Step 802: Select action guide information from a preset action guideinformation library and send the action guide information to a terminal110, so that the terminal 110 displays and/or plays in an audio form theaction guide information, and collects a corresponding set of actionimages.

In one implementation, the terminal 110 displays the action guideinformation selected from the preset action guide information libraryand displays reading progress information at a speed corresponding tothe action guide information; and/or the terminal 110 plays the actionguide information in an audio form at a speed corresponding to theaction guide information selected from the preset action guideinformation library.

Step 804: Receive the action image sent by the terminal, and performmatching detection on the set of action images and the action guideinformation, to obtain a living body detection result indicating whethera living body exists in the collected set of action images.

In one implementation, the action guide information includes mouth shapeguide information. The action image includes a mouth shape image. Theperforming matching detection on the set of action images and the actionguide information, to obtain a living body detection result indicatingwhether a living body exists in the collected set of action imagesincludes: extracting a mouth shape feature from the mouth shape image;and performing matching detection on the extracted mouth shape featureand a preset mouth shape feature corresponding to the action guideinformation, to obtain the living body detection result indicatingwhether a living body exists in the collected set of action images.

In one implementation, a quantity of action images is a preset quantitygreater than 1. The identity verification method further includes:collecting a face image included in each action image and performingface identification, and when identification results are not the same,directly obtaining an identity verification result indicating thatverification fails.

Step 806: Determine an identity verification result according to theliving body detection result and then return the identity verificationresult to the terminal.

In one implementation, the identity verification method furtherincludes: receiving user identity information collected and sent by theterminal and performing verification according to the collected useridentity information, to obtain a user identity information verificationresult. Step 806 includes: determining the identity verification resultaccording to the user identity information verification result and thenreturning the identity verification result to the terminal.

In one implementation, the operation of receiving user identityinformation collected and sent by the terminal and performingverification according to the collected user identity information, toobtain a user identity information verification result includes:receiving multiple pieces of the user identity information collected andsent by the terminal and separately detecting a user identificationcorresponding to each piece of the user identity information; anddetecting whether user identifications corresponding to the multiplepieces of the user identity information are the same, to obtain the useridentity information verification result.

In one implementation, the operation of receiving user identityinformation collected and sent by the terminal and performingverification according to the collected user identity information, toobtain a user identity information verification result includes:receiving a certificate image collected and sent by the terminal, andperforming literal identification on the certificate image, to obtain auser identification matching the certificate image; receiving a faceimage collected and sent by the terminal, and calculating similaritybetween the collected face image and a face image corresponding to theuser identification in a face comparison library; and determining theuser identity information verification result according to thesimilarity.

In one implementation, the receiving a face image collected and sent bythe terminal, and calculating similarity between the collected faceimage and a face image corresponding to the user identification in aface comparison library specifically includes: capturing a certificatehead portrait in the certificate image; receiving the face imagecollected and sent by the terminal; and comparing the collected faceimage and the corresponding certificate head portrait separately withthe face image corresponding to the user identification in the facecomparison library, to obtain similarity by calculation.

In one implementation, the operation of determining the identityverification result according to the user identity informationverification result includes: when the living body detection resultindicates that a living body exists in the collected set of actionimages, and the user identity information verification result is thatverification is passed, determining that the identity verificationresult is that verification is passed.

In one implementation, before step 802, it is further included:detecting a financial service operation instruction and selecting theaction guide information from the preset action guide informationlibrary and sending the action guide information to the terminal afterdetecting the financial service operation instruction. After step 806,it is further included: executing a financial service operationcorresponding to the financial service operation instruction when theidentity verification result is that verification is passed.

In the foregoing identity verification method, a user is guided in avisual and/or sound manner to complete a corresponding action bydisplaying and/or playing the action guide information selected from thepreset action guide information library, so as to collect thecorresponding set of action images. Then matching detection is performedon the collected set of action images and the action guide information,to obtain the living body detection result indicating whether a livingbody exists in the collected set of action images, so as to obtain theidentity verification result according to the living body detectionresult. In this way, a situation of violent cracking by a machine may beavoided by means of living body detection to verify whether a real useris currently performing operations, to make a final identityverification result more accurate and improve security.

As shown in FIG. 1, an identity verification system 100 includes aterminal 110 and a server 120.

The terminal 110 is configured to receive the action guide informationselected from preset action guide information library and sent by theserver 120, is further configured to display and/or play in an audioform the action guide information and collect a corresponding set ofaction images, and is further configured to send the collected set ofaction images to the server 120.

The preset action guide information library includes various actionguide information. A function of the action guide information is guidinga user to make a corresponding action. Action guide information may berandomly selected from the preset action guide information library ormay be selected in a confidential selection sequence. The selectionsequence is regularly updated.

In one implementation, the action guide information includes an actioninstruction sequence composed of multiple action instruction units. Theaction instruction unit herein refers to a minimum action guide unit.One action instruction unit indicates an action. Multiple actioninstruction units are arranged in sequence to form an action instructionsequence. In this implementation, the action guide information includesan action instruction sequence composed of multiple action instructionunits. In this way, a situation in which identity verification iscracked by means of random experiments can be avoided as much aspossible, so that a living body detection result is more accurate.

The action guide information may be represented in a visual form, suchas in a literal form and in a form of a schematic diagram. The actionguide information is played in an audio form. Specifically, audio dataof characters or words may be pre-recorded. When the action guideinformation is played, corresponding audio data in the action guideinformation is played character by character, or word segmentation maybe first performed on the action guide information, and then the actionguide information is converted into corresponding audio data by usingwords as a unit and is played. Certainly, while the action guideinformation is displayed, the action guide information may be played inan audio form.

While the action guide information is displayed or played, an actionimage corresponding to the action guide information is collected. Theaction image herein refers to an image that should include an actionmade by a user according to the action guide information. Images may becollected at a preset time interval within a display and/or play timesegment corresponding to one action instruction unit. An image that ismost different from another image collected within the time segment inthe collected images or a part of said image is used as the collectedset of action images. In one implementation, when movement is detectedwithin view of a camera by means of movement detection, an image iscollected by using the camera immediately or after short preset time iswaited. The collected image or a part of the collected image is used asthe action mage.

The server 120 performs matching detection on the set of action imagesand the action guide information, to obtain a living body detectionresult indicating whether a living body exists in the collected set ofaction images.

Matching detection is performed on two objects, to detect whether thetwo objects match each other. A degree of matching between the twoobjects may also be detected. If it is detected that the collected setof action images matches the action guide information, it indicates thata living body exists in the collected set of action images, and theliving body detection result indicating that a living body exists in thecollected set of action images is obtained. If it is detected that thecollected set of action images does not match the action guideinformation, it indicates that a living body does not exist, and theliving body detection result indicating that a living body does notexist is obtained.

The living body detection result may take a value from two presetvalues. For example, one is used for indicating that a living bodyexists in the collected set of action images, and zero is used forindicating that a living body does not exist. The living body detectionresult may also be represented by using a matching value indicating adegree of matching between the collected set of action images and theaction guide information. If the matching value exceeds a matching valuethreshold, it indicates that a living body exists in the collected setof action images. If the matching value does not exceed the matchingvalue threshold, it indicates that a living body does not exist. Thematching value herein may be represented by using similarity between theaction image and a preset action image corresponding to the action guideinformation or may be represented by using a value after positivecorrelation is performed on the similarity. The matching value may alsobe represented by using an Euclidean distance between the action featureextracted from the action image and a preset action featurecorresponding to the action guide information, or may be represented byusing a value after positive correlation is performed on the Euclideandistance.

In one implementation, the server 120 is further configured to extractan action feature from the collected set of action images, and performmatching detection on the extracted action feature and a preset actionfeature corresponding to the action guide information, to obtain theliving body detection result whether a living body exists in thecollected set of action images.

The server 120 is further configured to determine an identityverification result according to the living body detection result andthen return the identity verification result to the terminal 110. Theterminal 110 is further configured to receive the identity verificationresult.

Specifically, in one implementation, the server 120 is configured todetermine, when the living body detection result indicates that a livingbody exists in the collected set of action images, that the identityverification result is that verification is passed. In oneimplementation, the server 120 is configured to determine, when theliving body detection result indicates that a living body does notexist, that the identity verification result is that verification fails.In one implementation, the server 120 may further be configured toobtain the identity verification result according to a combination ofthe living body detection result and other verification manners.

The foregoing identity verification system 100 guides a user in a visualand/or sound manner to complete a corresponding action by displayingand/or playing the action guide information selected from the presetaction guide information library, so as to collect the corresponding setof action images. Then matching detection is performed on the collectedset of action images and the action guide information, to obtain theliving body detection result indicating whether a living body exists inthe collected set of action images, so as to obtain the identityverification result according to the living body detection result. Inthis way, a situation of violent cracking by a machine may be avoided bymeans of living body detection to verify whether a real user iscurrently performing operations, to make a final identity verificationresult more accurate and improve security.

In one implementation, the terminal 110 is further configured to collectuser identity information and send the user identity information to theserver 120. The server 120 is further configured to perform verificationaccording to the collected user identity information, to obtain a useridentity information verification result, and is further configured todetermine the identity verification result according to the living bodydetection result and the user identity information verification resultand then return the identity verification result to the terminal 110.

The user identity information refers to information used for proving auser identity, which includes at least one of a user account, a userpassword, user certificate information, and user biological featureinformation. The user biological feature information includes facefeature information, fingerprint feature information, iris featureinformation, a palm geometrical shape, and the like. The certificateinformation includes a certificate number, a name, the date of birth, anissuing authority, a validity period, and the like. A certificate may bespecifically an identity card, a driving license, a social securitycard, a passport, and the like.

The server 120 may be specifically configured to acquire user identityinformation input by a user. For example, a character string entered ina user account input box is acquired as a user account, and a characterstring entered in a user password input box is acquired as a userpassword. For another example, certificate information input in acertificate information input box is acquired. Collecting the useridentity information may also be acquiring the user identity informationby calling a camera, a sensor, and the like. For example, a certificateimage or a face image is acquired by camera scanning, and thefingerprint feature information, the iris feature information, and thelike are obtained by sensor scanning.

The server 120 may be specifically configured to perform verification onthe collected user identity information, and specifically performverification on the collected user identity information. For example, asregards the certificate information, whether a certificate number meetsa preset format and whether current time is within a validity period maybe determined.

The server 120 may be specifically perform verification according to thecollected user identity information, and specifically, perform matchingdetection on the collected user identity information and prestored useridentity information, to obtain the identity information verificationresult. For example, as regards the user account and the user password,a prestored password corresponding to the user account may be acquired,and whether the collected user password is the same as the prestoredpassword is determined, to obtain the identity information verificationresult. The identity information verification result is used forindicating whether verification performed according to the collecteduser identity information is passed.

The server 120 is configured to obtain a final identity verificationresult by combining the living body detection result and the useridentity information verification result. In one implementation, theserver 120 is configured to determine that the identity verificationresult is that verification is passed when the living body detectionresult indicates that a living body exists in the collected set ofaction images, and the user identity information verification result isthat verification is passed. In one implementation, the server 120 isconfigured to determine that the identity verification result is thatverification fails when the living body detection result indicates thata living body does not exist, and the user identity informationverification result is that verification is passed. In oneimplementation, the server 120 is configured to determine that theidentity verification result is that verification fails when the livingbody detection result indicates that a living body does not exist, andthe user identity information verification result is that verificationis passed.

In one implementation, the action image includes a mouth shape image.The server 120 is further configured to extract a mouth shape featurefrom the mouth shape image, and perform matching detection on theextracted mouth shape feature and a preset action feature correspondingto the action guide information, to obtain the living body detectionresult whether a living body exists in the collected set of actionimages.

The action guide information in this implementation is informationguiding a user to speak and may be referred to as the mouth shape guideinformation. When the action image is collected, a lip position may bedirectly detected, to obtain the action image mainly including a usermouth shape. In one implementation, the action image is a face image.The face image includes a mouth shape image. A mouth of a person isfastened relative to the position of a face. In this way, the mouthshape image in the face image may be directly positioned after the faceimage is determined.

The mouth shape may also be referred to as a lip shape. A mouth shape ofa person may be represented by an inner lip line and an outer lip lineof a mouth, and a feature that can reflect change of the inner lip lineand/or the outer lip line may be used as a mouth shape feature. Usingthe inner lip line as an example, when the mouth shape is tightlyclosing a mouth, the inner lip line is a straight line. When the mouthshape is completely open, the inner lip line is a similar round shape.Therefore, an area of a zone enclosed by the inner lip line may be usedas the mouth shape feature, or a distance between left and rightboundaries of the inner lip line of the mouth shape and a distancebetween upper and lower boundaries may be used as the mouth shapefeature.

Specifically, the server 120 may be configured to make a person inadvance to read, at a standard speed, content expressed by the actionguide information, the mouth shape image indicating change of the mouthshape in a reading process is collected, and the mouth shape feature isextracted as the preset mouth shape feature and is stored correspond tothe action guide information. The server 120 may be specificallyconfigured to: calculate similarity between the extracted mouth shapefeature and the preset mouth shape feature; if the similarity is greaterthan a similarity threshold, obtain the living body detection resultindicating that a living body exists in the collected set of actionimages; and if the similarity is not greater than the similaritythreshold, obtain the living body detection result indicating that aliving body does not exist.

In this implementation, living body detection is performed by guiding auser to change a mouth shape and collecting the mouth shape image. Animplementation cost is low, and accuracy is high. In addition, theaction image may also include a complete face image, and may be appliedto a subsequent identity verification process, improving a resourcereusing rate.

In one implementation, the terminal 110 is further configured to displaythe action guide information selected from the preset action guideinformation library and display reading progress information at a speedcorresponding to the action guide information. The speed refers to aspeed of speaking. Specifically, content expressed by the action guideinformation may be displayed word by word at the speed, or the wholeaction guide information may be directly displayed, and a speed progressbar is displayed, so that the speed progress bar changes from a firstcharacter of the action guide information according to a correspondingspeed.

In one implementation, the terminal 110 is further configured to playthe action guide information in an audio form at the speed correspondingto the action guide information selected from the preset action guideinformation library. In this implementation, the action guideinformation is played at the standard speed, and a user is guided tolisten and repeat, so that the user controls change of a mouth shape atthe speed, and the terminal 110 is configured to collect thecorresponding set of action images.

In this implementation, a user is guided to complete mouth shape changerequired by the action guide information at the standard speed, so as toimprove accuracy of living body detection and avoiding invalidation ofliving body detection resulting from an abnormal speed of the user.

In one implementation, a quantity of action images is a preset quantitygreater than 1. The terminal 110 is further configured to: collect aface image included in each action image and perform faceidentification; and when identification results are not the same,directly obtain an identity verification result indicating thatverification fails. A preset quantity may be set according to needs, forexample, be set to 3, 4, or 5. In this implementation, faceidentification is performed on a face image included in each actionimage. If a user changes in a living body detection process, it causesthat identification results are not the same, and then the identityverification result indicating that verification fails is directlyprovided. In this way, considering that living body detection takes aperiod of time, to ensure security, it is necessary to ensure that asame user performs operation in the living body detection process allthe time.

In one implementation, if the collected user identity informationincludes a face image, the server 120 is further configured to: performface identification on a face image included in each action image and aface graph included in the user identity information, and when theidentification results are not the same, directly obtain the identityverification result indicating that verification fails.

In one implementation, the terminal 110 is further configured to collectmultiple pieces of user identity information and send the user identityinformation to the server 120. The server 120 is further configured todetect a user identification corresponding to each piece of useridentity information, and is further configured to detect whether useridentifications corresponding to the multiple pieces of user identityinformation are the same, to obtain the user identity informationverification result.

In this implementation, the user identification refers to a character ora character string that can uniquely identify a user. Detection isperformed separately by using multiple pieces of user identityinformation to obtain corresponding user identifications, so as todetect whether these user identifications obtained by detection are allthe same. If the user identifications obtained by detection are all thesame, an identity information verification result that verification ispassed is provided. If the user identifications obtained by detectionare not the same, an identity information verification result thatverification fails is provided. The identity information verificationresult detected in this way is more reliable, so that the final identityverification result is more reliable.

In one implementation, the terminal 110 is further configured to collecta certificate image and a face image and send the certificate image andthe face image to the server 120. The server 120 is further configuredto: perform literal identification on the certificate image, to obtain auser identification matching the certificate image; calculate similaritybetween the collected face image and a face image corresponding to theuser identification in a face comparison library; and determine the useridentity information verification result according to the similarity.

Specifically, a client runs on the terminal 110. The client may be anoriginal sound application client or may be a light application client.A light application is an application that can be used without beingdownloaded. A current common light application uses HTML5 (HypertextMarkup Language Version 5) compilation. The terminal 110 is configuredto send the collected certificate image to the server 120. The server120 is configured to perform literal identification on the certificateimage, to obtain the user identification matching the certificate image.

The terminal 110 is configured to call a camera by using the clientrunning on the terminal 110, to scan a certificate in a photographing orvideoing form to obtain the certificate image. The terminal 110 may beconfigured to provide an interaction interface by using the client, toguide a user to scan the certificate according to a prompt.Specifically, a front side of the certificate may be first scanned, andthen a back side of the certificate is scanned. Original photos of thefront and back sides of the certificate and front-side and back-sidecertificate images cut according to a certificate shape may be providedin a scanning process. A quantity of the original photos and a quantityof the front-side and back-side certificate images may be separatelyone, and certainly, may be self-defined according to needs. The terminal110 may be further configured to determine the shape and colordistribution of the certificate image, to determine whether thecertificate is a forged certificate or determine whether the certificateimage is forged.

The server 120 may be configured to use an OCR means to perform literalidentification on the certificate image, to identify literal informationtherein. The literal information is then compared with certificateinformation stored on an external certificate server, to search formatching certificate information, and a corresponding useridentification is acquired. The certificate server herein may be anidentity card server of a citizen identity management institution, adriving license information server of a vehicle management institution,a social guarantee card information server of a social securityguarantee institution, a passport information server of a passportissuing institution, or the like.

The server 120 may be further configured to compare the identifiedliteral information and literal information input by the user, todetermine whether the identified literal information matches the literalinformation. If the identified literal information and the literalinformation are not the same, an identity verification result indicatingthat identity verification fails is directly provided. In this way, itcan be avoided that the user embezzles another person's certificate toperform operation. If identification cannot be performed, a reason whyidentification cannot be performed may be provided, and a correspondingerror prompt is provided.

Specifically, if a certificate image exists, and a face comparisonlibrary exists, a certificate head portrait in the certificate image iscaptured, the face image is collected, and the collected face image anda corresponding certificate head portrait are separately compared with aface image corresponding to the user identification in the facecomparison library, to obtain similarity by calculation. The similarityherein indicates a similarity degree between corresponding face images.

If no certificate image exists, or no certificate head portrait iscaptured from the certificate image, only the collected face image iscompared with a face image in the face comparison library, to obtainsimilarity by calculation. In this way, comparison detection may be nolonger performed on the external certificate server.

If no face comparison library exists, the collected face image may becompared with the certificate head portrait. At the same time, thecollected face image and the certificate head portrait are sent to theexternal certificate server and are compared, to obtain similarity bycalculation.

If no certificate image exists, or no certificate head portrait iscaptured from the certificate image, and no face comparison libraryexists, the collected face image may be directly sent to the externalcertificate server and is compared, to obtain similarity by calculation.

If the similarity is higher than the similarity threshold, an identityinformation verification result indicating that verification is passedis obtained. If the similarity is not higher than the similaritythreshold, an identity information verification result indicating thatverification fails is obtained. If multiple similarities exist, wheneach similarity is higher than a corresponding similarity threshold, anidentity information verification result indicating that verification ispassed is obtained. When a situation in which the similarity does notexceed a corresponding similarity threshold exists, it can be determinedthat the identity information verification result is that verificationfails.

In this implementation, comprehensive verification is performed on theuser identity information by combining the certificate image and thecollected face image, to make the identity information verificationresult more accurate, to make the identity verification result moreaccurate.

In one implementation, the server 120 is further configured to capture acertificate head portrait in the certificate image, and separatelycompare a collected face image and a corresponding certificate headportrait with a face image corresponding to the user identification inthe face comparison library, to obtain similarity by calculation.

In one implementation, the server 120 is further configured to determinethat the identity verification result is that verification is passedwhen the living body detection result indicates that a living bodyexists in the collected set of action images, and the user identityinformation verification result is that verification is passed.

In one implementation, the terminal 110 is further configured to detecta financial service operation instruction and acquire the action guideinformation selected from the preset action guide information libraryafter detecting the financial service operation instruction, and isfurther configured to execute a financial service operationcorresponding to the financial service operation instruction when theidentity verification result returned by the server 120 is thatverification is passed. The financial service herein includes a loanapplying service, a credit card online management service, an investmentservice, and the like. In this implementation, transaction security inthe financial service is ensured by means of the foregoing identityverification method, so that management of the financial service is moresecure and reliable.

The foregoing identity verification system 100 guides a user in a visualand/or sound manner to complete a corresponding action by displayingand/or playing the action guide information selected from the presetaction guide information library, so as to collect the corresponding setof action images. Then matching detection is performed on the collectedset of action images and the action guide information, to obtain theliving body detection result indicating whether a living body exists inthe collected set of action images, so as to obtain the identityverification result according to the living body detection result. Inthis way, a situation of violent cracking by a machine may be avoided bymeans of living body detection to verify whether a real user iscurrently performing operations, to make a final identity verificationresult more accurate and improve security.

As shown in FIG. 9, in one implementation, an identity verificationapparatus 900 is provided, including an action image collection module901, a living body detection module 902, and an identity verificationresult determining module 903.

The action image collection module 901 is configured to display and/orplay in an audio form action guide information selected from a presetaction guide information library, and collect a corresponding set ofaction images.

The living body detection module 902 is configured to perform matchingdetection on the collected set of action images and the action guideinformation, to obtain a living body detection result indicating whethera living body exists in the collected set of action images.

The identity verification result determining module 903 is configured todetermine a living body detection result indicating whether a livingbody exists in the collected set of action images.

As shown in FIG. 10, in one implementation, the identity verificationapparatus 900 further includes a user identity information verificationmodule 904, configured to collect user identity information and performverification according to the collected user identity information, toobtain a user identity information verification result. The identityverification result determining module 903 is further configured todetermine the identity verification result according to the living bodydetection result and the user identity information verification result.

In one implementation, the action guide information includes mouth shapeguide information. The action image includes a mouth shape image. Theliving body detection module 902 is further configured to extract amouth shape feature from the mouth shape image, and is furtherconfigured to perform matching detection on the extracted mouth shapefeature and a preset mouth shape feature corresponding to the actionguide information, to obtain the living body detection result indicatingwhether a living body exists in the collected set of action images.

In one implementation, the action guide information includes mouth shapeguide information. The action image collection module 901 is configuredto display the action guide information selected from the preset actionguide information library and display reading progress information at aspeed corresponding to the action guide information.

In one implementation, the action guide information includes mouth shapeguide information. The action image collection module 901 is configuredto play the action guide information in an audio form at the speedcorresponding to the action guide information selected from the presetaction guide information library.

In one implementation, a quantity of action images is a preset quantitygreater than 1. The user identity information verification module 904 isfurther configured to: collect a face image included in each actionimage and perform face identification; and when identification resultsare not the same, directly obtain an identity verification resultindicating that verification fails.

In one implementation, the user identity information verification module904 is further configured to: collect multiple pieces of the useridentity information and separately detect a user identificationcorresponding to each piece of the user identity information; and detectwhether user identifications corresponding to the multiple pieces of theuser identity information are the same, to obtain the user identityinformation verification result.

As shown in FIG. 11, in one implementation, the user identityinformation verification module 904 includes: a certificate imageprocessing module 904 a, a face image processing module 904 b, and averification execution module 904 c.

The certificate image processing module 904 a is configured to collect acertificate image and perform literal identification on the certificateimage, to obtain a user identification matching the certificate image.

The face image processing module 904 b is configured to collect a faceimage and calculate similarity between the collected face image and aface image corresponding to the user identification in the facecomparison library.

The verification execution module 904 c is configured to determine theuser identity information verification result according to thesimilarity.

As shown in FIG. 12, in one implementation, the face image processingmodule 904 b includes: a capture module 904 b 1, a face image collectionmodule 904 b 2, and a comparison module 904 b 3.

The capture module 904 b 1 is configured to capture a certificate headportrait in the certificate image.

The face image collection module 904 b 2 is configured to collect a faceimage.

The comparison module 904 b 3 is configured to separately compare thecollected face image and a corresponding certificate head portrait witha face image corresponding to the user identification in the facecomparison library, to obtain similarity by calculation.

In one implementation, the identity verification result determiningmodule 903 is further configured to determine that the identityverification result is that verification is passed when the living bodydetection result indicates that a living body exists in the collectedset of action images, and the user identity information verificationresult is that verification is passed.

As shown in FIG. 13, in one implementation, the identity verificationapparatus 900 further includes a receiving module 905, configured toreceive the action guide information selected from the preset actionguide information library and sent by a server.

The living body detection module 902 is further configured to: send thecollected set of action images to a server, so that the server performsmatching detection on the set of action images and the action guideinformation, to obtain the living body detection result indicatingwhether a living body exists in the collected set of action images.

The user identity information verification module 904 is furtherconfigured to collect user identity information and send the useridentity information to a server, so that the server performsverification according to the collected user identity information, toobtain the user identity information verification result.

The identity verification result determining module 903 is furtherconfigured to receive the identity verification result returned afterthe server determines the identity verification result according to theliving body detection result and the user identity informationverification result.

As shown in FIG. 14, in one implementation, the identity verificationapparatus 900 further includes a financial service processing module906, configured to detect a financial service operation instruction andacquire the action guide information selected from the preset actionguide information library after detecting the financial serviceoperation instruction, and is further configured to execute a financialservice operation corresponding to the financial service operationinstruction when the identity verification result is that verificationis passed.

In the foregoing identity verification apparatus 900 guides a user in avisual and/or sound manner to complete a corresponding action bydisplaying and/or playing the action guide information selected from thepreset action guide information library, so as to collect thecorresponding set of action images. Then matching detection is performedon the collected set of action images and the action guide information,to obtain the living body detection result indicating whether a livingbody exists in the collected set of action images, so as to obtain theidentity verification result according to the living body detectionresult. In this way, a situation of violent cracking by a machine may beavoided by means of living body detection to verify whether a real useris currently performing operations, to make a final identityverification result more accurate and improve security.

A person of ordinary skill in the art can understand that a wholeprocess or a part of a process in the foregoing implementation methodscan be completed by instructing relevant hardware by using a computerprogram. The program may be stored in a non-transitory computer readablestorage medium. When being executed, the program may include processesof the implementations of the foregoing methods. The storage medium maybe a nonvolatile storage medium such as a magnetic disk, an opticaldisc, and a read-only memory (Read-Only Memory, ROM), or a random accessmemory (Random Access Memory, RAM).

The technical features in the foregoing implementations can be randomlycombined. For concision of descriptions, not all possible combinationsof the technical features in the foregoing implementations aredescribed. However, as long as the combinations of these technicalfeatures are not contradictory, the combinations should all be regardedas the scope disclosed in the specification.

he foregoing implementations only describe several implementationmanners of the present disclosure, and their description is specific anddetailed, but cannot therefore be understood as a limitation to thepatent scope of the present disclosure. It should be noted that a personof ordinary skill in the art may further make variations andimprovements without departing from the conception of the presentdisclosure, and these all fall within the protection scope of thepresent disclosure Therefore, the patent protection scope of the presentdisclosure should be subject to the appended claims.

What is claimed is:
 1. An identity verification method performed at anelectronic device having one or more processors and memory storing aplurality of programs, the method comprising: playing, in an audio form,action guide information selected from a preset action guide informationlibrary, and collecting a corresponding set of action images within apreset time window, wherein the action guide information includes mouthshape guide information and is being played at a speed corresponding tothe action guide information selected from the preset action guideinformation library; performing matching detection on the collected setof action images and the action guide information, to obtain a livingbody detection result indicating whether a living body exists in thecollected set of action images; according to the living body detectionresult that indicates that a living body exists in the collected set ofaction images: collecting user identity information and performingverification according to the collected user identity information, toobtain a user identity information verification result; and determiningthe identity verification result according to the user identityinformation verification result.
 2. The method according to claim 1,wherein the action image comprises a mouth shape image, and theoperation of performing matching detection on the collected set ofaction images and the action guide information, to obtain a living bodydetection result indicating whether a living body exists in thecollected set of action images comprises: extracting a mouth shapefeature from the mouth shape image; and performing matching detection onthe extracted mouth shape feature and a preset mouth shape featurecorresponding to the action guide information, to obtain the living bodydetection result indicating whether a living body exists in thecollected set of action images.
 3. The method according to claim 1,wherein the operation of collecting user identity information andperforming verification according to the collected user identityinformation, to obtain a user identity information verification resultcomprises: collecting multiple pieces of the user identity informationand separately detecting a user identification corresponding to eachpiece of the user identity information; and detecting whether useridentifications corresponding to the multiple pieces of the useridentity information are the same, to obtain the user identityinformation verification result.
 4. The method according to claim 1,wherein the operation of collecting user identity information andperforming verification according to the collected user identityinformation, to obtain a user identity information verification resultcomprises: collecting a certificate image and performing literalidentification on the certificate image, to obtain a user identificationmatching the certificate image; collecting a face image and calculatingsimilarity between the collected face image and a face imagecorresponding to the user identification in a face comparison library;and determining the user identity information verification resultaccording to the similarity.
 5. The method according to claim 4, whereinthe operation of collecting a face image and calculating similaritybetween the collected face image and a face image corresponding to theuser identification in a face comparison library comprises: capturing acertificate head portrait in the certificate image; collecting a faceimage; and comparing the collected face image and the correspondingcertificate head portrait with the face image corresponding to the useridentification in the face comparison library separately, and obtainingthe similarity by calculation.
 6. The method according to claim 1, themethod further comprising: before playing, in the audio form, the actionguide information selected from a preset action guide informationlibrary, and collecting a corresponding set of action images: receivingthe action guide information selected from the preset action guideinformation library and sent by a server.
 7. The method according toclaim 1, wherein the operation of performing matching detection on thecollected set of action images and the action guide information, toobtain a living body detection result indicating whether a living bodyexists in the collected set of action images comprises: sending thecollected set of action images to a server, so that the server performsmatching detection on the set of action images and the action guideinformation, to obtain the living body detection result indicatingwhether a living body exists in the collected set of action images. 8.The method according to claim 1, wherein the operation of collectinguser identity information and performing verification according to thecollected user identity information, to obtain a user identityinformation verification result comprises: collecting the user identityinformation and sending the user identity information to the server, sothat the server performs verification according to the collected useridentity information and obtains the user identity informationverification result.
 9. The method according to claim 1, wherein theoperation of determining the identity verification result according tothe user identity information verification result comprises: receivingthe identity verification result returned by the server afterdetermining the identity verification result according to the useridentity information verification result.
 10. The method according toclaim 1, the method further comprising: before playing, in the audioform, the action guide information selected from a preset action guideinformation library, and collecting a corresponding set of actionimages: detecting a financial service operation instruction andacquiring the action guide information selected from the preset actionguide information library after detecting the financial serviceoperation instruction; and the method further comprising: executing afinancial service operation corresponding to the financial serviceoperation instruction when the identity verification result is thatverification is passed.
 11. A terminal, comprising: a processor; memory;and a plurality of programs stored in the memory, wherein the pluralityof programs, when executed by the processor, cause the processor toexecute the following steps: playing, in an audio form, action guideinformation selected from a preset action guide information library, andcollecting a corresponding set of action images within a preset timewindow, wherein the action guide information includes mouth shape guideinformation and is being played at a speed corresponding to the actionguide information selected from the preset action guide informationlibrary; performing matching detection on the collected set of actionimages and the action guide information, to obtain a living bodydetection result indicating whether a living body exists in thecollected set of action images; according to the living body detectionresult that indicates that a living body exists in the collected set ofaction images: collecting user identity information and performingverification according to the collected user identity information, toobtain a user identity information verification result; and determiningthe identity verification result according to the user identityinformation verification result.
 12. The terminal according to claim 11,wherein the action image comprises a mouth shape image, and theoperation of performing matching detection on the collected set ofaction images and the action guide information, to obtain a living bodydetection result indicating whether a living body exists in thecollected set of action images comprises: extracting a mouth shapefeature from the mouth shape image; and performing matching detection onthe extracted mouth shape feature and a preset mouth shape featurecorresponding to the action guide information, to obtain the living bodydetection result indicating whether a living body exists in thecollected set of action images.
 13. The terminal according to claim 11,wherein the operation of collecting user identity information andperforming verification according to the collected user identityinformation, to obtain a user identity information verification resultcomprises: collecting multiple pieces of the user identity informationand separately detecting a user identification corresponding to eachpiece of the user identity information; and detecting whether useridentifications corresponding to the multiple pieces of the useridentity information are the same, to obtain the user identityinformation verification result.
 14. The terminal according to claim 11,wherein the operation of collecting user identity information andperforming verification according to the collected user identityinformation, to obtain a user identity information verification resultcomprises: collecting a certificate image and performing literalidentification on the certificate image, to obtain a user identificationmatching the certificate image; collecting a face image and calculatingsimilarity between the collected face image and a face imagecorresponding to the user identification in a face comparison library;and determining the user identity information verification resultaccording to the similarity.
 15. The terminal according to claim 14,wherein the operation of collecting a face image and calculatingsimilarity between the collected face image and a face imagecorresponding to the user identification in a face comparison librarycomprises: capturing a certificate head portrait in the certificateimage; collecting a face image; and comparing the collected face imageand the corresponding certificate head portrait with the face imagecorresponding to the user identification in the face comparison libraryseparately, and obtaining the similarity by calculation.
 16. A server,comprising: a processor; memory; and a plurality of programs stored inthe memory, wherein the plurality of programs, when executed by theprocessor, cause the processor to execute the following steps: selectingaction guide information from a preset action guide information library,wherein the action guide information includes mouth shape guideinformation; sending the action guide information to a terminal;receiving a set of action images collected and returned by the terminal,wherein the set of action images is collected by the terminal when theaction guide information is played at the terminal, in an audio form, ata speed corresponding to the action guide information selected from thepreset action guide information library; performing matching detectionon the set of action images and the action guide information, to obtaina living body detection result indicating whether a living body existsin the collected set of action images; according to the living bodydetection result that indicates that a living body exists in thecollected set of action images: receiving user identity informationcollected and sent by the terminal and performing verification accordingto the collected user identity information, to obtain a user identityinformation verification result; and returning the identity verificationresult to the terminal.
 17. The server according to claim 16, whereinthe action image comprises a mouth shape image, and the performingmatching detection on the set of action images and the action guideinformation, to obtain a living body detection result indicating whethera living body exists in the collected set of action images comprises:extracting a mouth shape feature from the mouth shape image; andperforming matching detection on the extracted mouth shape feature and apreset mouth shape feature corresponding to the action guideinformation, to obtain the living body detection result indicatingwhether a living body exists in the collected set of action images. 18.The server according to claim 16, wherein the operation of performingmatching detection on the collected set of action images and the actionguide information, to obtain a living body detection result indicatingwhether a living body exists in the collected set of action imagescomprises: extracting a mouth shape feature from the mouth shape image;and performing matching detection on the extracted mouth shape featureand a preset mouth shape feature corresponding to the action guideinformation, to obtain the living body detection result indicatingwhether a living body exists in the collected set of action images. 19.The server according to claim 16, wherein the operation of collectinguser identity information and performing verification according to thecollected user identity information, to obtain a user identityinformation verification result comprises: collecting multiple pieces ofthe user identity information and separately detecting a useridentification corresponding to each piece of the user identityinformation; and detecting whether user identifications corresponding tothe multiple pieces of the user identity information are the same, toobtain the user identity information verification result.
 20. Theterminal according to claim 11, wherein the operation of receiving useridentity information collected and sent by the terminal and performingverification according to the collected user identity information, toobtain a user identity information verification result comprises:collecting, by the terminal, a certificate image and a face image,respectively; performing literal identification on the certificateimage, to obtain a user identification matching the certificate image;calculating similarity between the collected face image and a face imagecorresponding to the user identification in a face comparison library;and determining the user identity information verification resultaccording to the similarity.